const Router = require('koa-router')
const router = new Router({
  prefix: '/api/user'  // 设置路由前缀
})
const { User } = require('../models/model')


router.get('/test', async (ctx, next) => {
  // console.log(ctx.request.body)
  const data = await User.findAll()
  ctx.status = 200
  ctx.body = {
    code: 200,
    msg: '信息成功',
    data: data
  }
})


module.exports = router